public class ArrayHelper{
    public static boolean equal(int[] first,int[] second){
        if(first.length==second.length){
            for(int i=0;i<first.length;i++){
                if(first[i]==second[i]){
                    return true;
                }
            }
        }else{
            return false;
        }
        return false;
    }
    public static void main(String[] args) {
        int [] first={2,5,8,3,6,9};
        int [] second={2,5,8,3,6,9};
        int [] third={3,4,5,6,7,8};
        int [] fourth={2,5,8,3,6,9};
        System.out.println( equal(first,second));//true
        System.out.println( equal(third,fourth));//false
    }
    
}